<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS外观文本之文字对齐</title>
    <style>
        h1 {
            text-align: center;
        }
    </style>
</head>

<body>
    <h1>居中对齐的标题</h1>
</body>

</html>